
<!-- INCLUDE overall_header.html -->
<script type="text/javascript">
    /**
     * Some functions for the AJAX checker
     */
    function createRequestObject() {
        var ro;
        var browser = navigator.appName;
        if(browser == "Microsoft Internet Explorer"){
            ro = new ActiveXObject("Microsoft.XMLHTTP");
        } else {
            ro = new XMLHttpRequest();
        }
        return ro;
    }

    var http = createRequestObject();

    function sndReq(mode, valuename1, value1, valuename2, value2) {
        // Show that the request is running
        if (mode == 'usernamecheck' && document.getElementById('username').value != ''){
            document.getElementById('usernamecheck').innerHTML = '{AJAX_CHECKING_IMG}&nbsp;Comprobando...';
        } else if (mode == 'passwordcheck' && document.getElementById('new_password').value != '' && document.getElementById('password_confirm').value != '') {
            document.getElementById('passwordcheck').innerHTML = '{AJAX_CHECKING_IMG}&nbsp;Comprobando...';
        } else if (mode == 'emailcheck' && document.getElementById('email').value != '' && document.getElementById('email_confirm').value != '') {
            document.getElementById('emailcheck').innerHTML = '{AJAX_CHECKING_IMG}&nbsp;Comprobando...';
        } else {
            return false;
        }

        // Make the request
        http.open('get', '{AJAX_CHECKS_FILE}?mode='+mode+'&'+valuename1+'='+value1+'&'+valuename2+'='+value2);
        http.onreadystatechange = handleResponse;
        http.send(null);
    }

    function handleResponse() {
        if(http.readyState == 4){
            var response = http.responseText;
            var update = new Array();

            if(response.indexOf('|' != -1)) {
                update = response.split('|');
                document.getElementById(update[0]).innerHTML = update[1];
            }
        }
    }
</script>
<style type="text/css">
    input {
        margin-left: 25px;
        padding: 9px;
        border: solid 1px #E5E5E5;
        outline: 0;
        font: normal 13px/100% Verdana, Tahoma, sans-serif;
        width: 200px;
        background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #EEEEEE), to(#FFFFFF));
        background: -moz-linear-gradient(top, #FFFFFF, #EEEEEE 1px, #FFFFFF 25px);
        box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
        -moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
        -webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px;
    }


    input:hover, input:focus{
        border-color: #C9C9C9;
        -webkit-box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 8px;
    }

    p label {
        color: #999999;
        padding-left: 5px;
        margin-left: 25px;
    }

    .submit input {
        width: auto;
        margin-top: 15px;
        margin-left: 55px;
        padding: 9px 15px;
        background: #617798;
        border: 0;
        font-size: 14px;
        color: #FFFFFF;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;
    }
    .submit input:hover {
        background: #806198;
    }
    .error {
        margin-top: 15px;
        margin-left: 30px;
        margin-bottom: 15px;
    }
</style>


<div class="panel">
    <div class="inner"><span class="corners-top"><span></span></span>
        <form method="post" action="{S_UCP_ACTION}" id="registro">
            <h2>{SITENAME} - {L_REGISTRATION} - "Editado, prueba1"</h2>
            <!-- Erroes normales
                        <p class="error">
            <!-- IF ERROR {ERROR}<!-- ENDIF
        </p>
            -->
            <p class="name">
                <input type="text" name="username" id="username" value="{USERNAME}" onblur="sndReq('usernamecheck', 'username', this.value, 'ignore', 'ignore')"/>
                <label for="name">Nombre</label>
            </p>
            <div class="error" id="usernamecheck"> </div>

            <p class="email">
                <input type="text" name="email" id="email" value="{EMAIL}" onblur="sndReq('emailcheck', 'email1', this.value, 'email2', document.getElementById('email_confirm').value)" />
                <label for="name">Email</label>
            </p>


            <p class="emailConfirm">
                <input type="text" name="email_confirm" id="email_confirm" value="{EMAIL_CONFIRM}" onblur="sndReq('emailcheck', 'email1', document.getElementById('email').value, 'email2', this.value)" />
                <label for="name">Confirmar Email</label>
            </p>
            <div class="error" id="emailcheck"> </div>
            <p class=pass">
                <input type="password" name="new_password" id="new_password" value="{PASSWORD}" onblur="sndReq('passwordcheck', 'password1', this.value, 'password2', document.getElementById('password_confirm').value)" />
                <label for="name">Contrase&ntilde;a</label>
            </p>


            <p class="passConfirm">
                <input type="password" name="password_confirm" id="password_confirm" value="{PASSWORD_CONFIRM}" onblur="sndReq('passwordcheck', 'password1', document.getElementById('new_password').value, 'password2', this.value)" />
                <label for="name">Confirmar contrase&ntilde;a</label>
            </p>
            <div class="error" id="passwordcheck"></div>

            <noscript>
                <p class="ANTIBOT">
                    <label for="human">{L_ANTIBOT_UNCHECK}</label><br /><span>{L_ANTIBOT_UNCHECK_EXPLAIN}</span>
                    <input type="checkbox" name="se_human" value="1" checked="checked" />
                </p>
            </noscript>


		{S_HIDDEN_FIELDS}
            <p class="submit">
                <input type="reset" value="Resetear" name="reset"/>&nbsp;
                <input type="submit" name="submit" id ="submit" value="Enviar" />
            </p>
		{S_FORM_TOKEN}

        </form>
        <span class="corners-bottom"><span></span></span></div>
</div>


<!-- INCLUDE overall_footer.html -->